<template>
	<ol class="layer-photo-ol" v-if="filesIds">
		<li v-for="(photo,index) in filesIds.split(',')">
			<img :layer-pid="'img'+index" :layer-src="photoUrl+photo" :src="photoUrl+photo" />
		</li>
	</ol>
</template>

<script>
	export default {
		name: "",
		props: ['filesIds'],
		mounted() {
			layer.photos({
				photos: $(this.$el),
				shift: 0
			});
		},
		data() {
			return {
				photoUrl: process.env.API_BASH_URL + 'sys/download/'
			};
		}
	}
</script>

<style scoped>
	.layer-photo-ol li {
		float: left;
	}
	
	.layer-photo-ol img {
		width: 158px;
		height: 150px;
		margin-left: 15px;
		border: 3px solid #f2f2f2;
		border-radius: 3px;
	}
</style>